package Tools;

public class Triangle extends PlaneFigure{

	private double a;
	private double b;
	private double h;
	private double c;
	private double s;
	public Triangle(){
		
	}
	public Triangle(String name,double a,double b,double h){
		super(name);
		this.a=a;
		this.b=b;
		this.h=h;
	}
	public double C(){
		c=a+b+h;
		String cc = String.format("%.2f",c);
		double c = Double.parseDouble(cc);
		return c;	
	}
	public double S(){
		s=a*h/2;
		String ss = String.format("%.2f",s);
		double s = Double.parseDouble(ss);
		return s;
	}
	

}